home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / amiga / gui / x / xfig.lha / src / x11 / Doc / TODO < prev    next >
Encoding:
Text File  |  1993-07-26  |  9.3 KB  |  172 lines

  1. This file contains some possible things to do in future versions of xfig.
  2.  
  3. allow rotated boxes (not just polygons)
  4. reduce number of grid lines (if necessary) when zooming < 1.0
  5. fix grid rounding problems at 0.75 zoom factor
  6. allow printing of grid in figure
  7. make the rulers understand the real screen resolution according to the server
  8. add the concept of "layers" for each depth.  That way a user may work on 
  9.     certain layers at one time, masking out or overlaying the other layers
  10.     as desired.
  11. make <Shift>middle mouse button DELETE previous points just created during
  12.     create POLYobject/ARC/Ellipse etc.  That way, one may backup when
  13.     creating objects.
  14. create resource for "print" command (e.g. lp, lpr, whatever) which uses meta-
  15.     notation to place filename (e.g.  print_command: "lpr -P%p %f" where %p
  16.     is the printer string and %f is the filename)
  17. make line counter update correctly when reading multiple-line POLYLINES and
  18.     SPLINES from input file
  19. allow vertically-aligned text
  20.   "top" would mean the insertion point specifies the line over the top of the
  21.         text
  22.   "middle" would mean that it specifies the midline of the text (I'm not
  23.         sure how this is defined, perhaps the average of top and base
  24.         or top and bottom.
  25.   "base" would mean the line under all letters which do not hang down.
  26.         For example, g and j extend below the baseline.
  27.   "bottom" would mean the time under the bottom of the text including
  28.         descenders.
  29. have arc sub-type 2 for pie wedge-type arcs
  30. have common edit popup for all four splines to allow conversion between all
  31. save modified_flag before file operations and restore if undo used
  32. Should arrow size change in update mode when linewidth changes?
  33. investigate whether eps objects that don't have a preview bitmap
  34.     are scaled correctly
  35. change eps_bitmaps so that background is transparent (needs to work
  36.     in normal and reverse-video modes).
  37. Make popup windows come up so that they don't overlap the figure (if possible).
  38.     An edit popup window should at least not overlap the
  39.     object being edited (again only if possible).
  40. Use fill pattern (grey-shading) to mimic color objects on monochrome systems.
  41. Extend smart links to work for SCALE, MOVEPT and perhaps EDIT, UPDATE.
  42.     Could also extend them to work for arc-type links and for
  43.     ellipse/circle objects and objects inside compound objects.  
  44.     Also, at the moment smart-links
  45.     only work for one end of a link if both ends of the link
  46.     happen to touch the object being operated on.  To fix this would
  47.     require changing the F_linkinfo structure to have left_endpt,
  48.     left_prevpt, right_endpt, right_prevpt fields instead of the current
  49.     endpt, prevpt and two_pts fields.
  50. Make xfig resources more consistent with normal use of resources in X clients.
  51.     e.g. provide support to allow each command button (say) to be
  52.     a different color.  Ditto for mode buttons, etc.
  53. investigate if we should be setting initialResourcesPersistent to false for
  54.     widgets that are created and destroyed as required.
  55. Still need to think about how point positioning should be utilized with
  56.     many of the editing commands, e.g. if point positioning is set to
  57.     large grid and you are trying to move an object, should:
  58.     a) it be ignored, b) you can pick up an object anywhere but
  59.     you must put the 'pick-up' point back on a grid posn,
  60.     c) you have to pick up and put down objects at grid posns,
  61.     d) you can pick up and place an object anywhere but when you
  62.     place it, the point on the object closest the pickup point is
  63.     automatically rounded to the nearest grid posn, e) you can
  64.     pick up objects anywhere and movement is multiples of the grid size.
  65.     The current behaviour is c) and b) can be mimicked by changing the
  66.     point posn indicator mid-move.  It has the disadvantage that you
  67.     may not be able to pick up an object which isn't on the grid points.
  68.     I think e) is the next best but it won't let you mimick b).
  69. Use clipping rectangles in more places:
  70.     use the redisplay_* routines as necessary.
  71. allow popup menus to be pinned?
  72. have a resource which can be set to keep backups during a save, instead of
  73.     prompting the user about overwrite etc.
  74. make a keypad label:
  75.     This should popup in the mousefun window whenever a panel for
  76.     entering text is entered.  The kbd_ic icon is already there.
  77. zooming of text is still a kludge. (It doesn't work properly yet)
  78. make arcs use pw_curve to speed them up.
  79. add bounding box to every F_object definition, useful for:
  80.     1) faster drawing of rubber objects
  81.     2) handling the selective redrawing of figures better after they become
  82.        the innocent victim during an expose or erasure of another object
  83. things like pan/zoom/resize/iconify will still leave junk on the screen
  84.     or mess up the figure if you are in the middle of drawing it:
  85.     One solution is to call canvas_rightbut_proc whenever the
  86.     action_on flag is set and one of the above functions is called.
  87.     This forces the operation being performed to be cancelled - probably
  88.     not a good idea for panning - we might be trying to pan a little
  89.     bit to place the last point in a large object.
  90.     Another solution is to have a big case statement which performs
  91.     a single elastic draw of whatever object is being drawn/moved etc.
  92.     The function would need to be called before an iconify (or
  93.     whatever) and again after the operation was completed.  This
  94.     would allow drawing operations to be continued after window functions
  95.     had been performed.
  96.     A third solution is to use a canvas_elasticdraw_save parameter
  97.     instead of using a case statement - it would need to be set
  98.     prior to every elastic draw operation.
  99. Generalize align mode (like glue mode) to allow arbitrary tagged objects to be
  100.     aligned rather than just compounds.
  101. Additional align mode options for distributing objects evenly within a compound
  102.     or abutting them together: abutT, abutB, abutL, abutR, distH, distV
  103. Some facility to provide better support for small screens.
  104.     e.g. scrollable mode button list or automatic resizing
  105.     to have several rows as needed.  A good test is to limit the total 
  106.     space to 640x480 so that it is still useable on an IBM-PC VGA screen.
  107. Make a raise/lower depth feature:
  108.     the raise_ic icon is already in w_icons.c
  109. Make xfig understand depth better:
  110.     If you set the depth using the object edit panels, xfig will redraw
  111.     them correctly, however it would be nice if as you entered new filled
  112.     objects that they were automatically given an appropriate depth.
  113.     This would involve finding the depth of all overlapping (filled?)
  114.     objects and setting the depth to be one less.
  115.     What about support for negative depth values?
  116.  
  117. --------------------------------------------------------------------
  118. The following items would require a change to the Fig file protocol:
  119. --------------------------------------------------------------------
  120.  
  121. extend color model to include 24-bit color
  122. use floating point coordinates for objects (at least internally to xfig if not
  123.     in the figure file)
  124. super/subscripts for text objects
  125. allow background color for figure and store in fig file - also requires that
  126.     fig2dev knows about this background color
  127. allow fractional text sizes (float)
  128. possibly make extension to Fig protocol to handle several line 
  129.     cap/join styles (e.g. round, butt, miter)
  130.  
  131. --------------------------------------------------------------------
  132. What really needs to be done is a major rework of the list structures used
  133.     to store xfig objects.  Here are some comments involving the change.
  134.  
  135. -------- note about restructuring xfig data structures -------------
  136. Rather than having a depth attribute for objects, you can use the order
  137. in which objects are entered to determine their depth:  later objects
  138. appear on the top.  A raise/lower depth operation would allow you to
  139. change the ordering.
  140.  
  141. The consequences to the current implementation of converting totally to this
  142. scheme are non-trivial.  Instead of having separate lists for each object
  143. type, you need to have a single list which has a union of all the different
  144. objects as its type.  This will require changes in many places in the code.
  145. At the moment there are many places where each of the lists are traversed
  146. separately.  In many cases the code can be simplified dramatically if there
  147. was only a single list.  For example, to perform a move on an object there
  148. are separate routines (one for each object type) to start/cancel/place the
  149. object.  You could replace this by a single routine for start/cancel and
  150. place which worked no matter what type you had.  (Who says you can't use
  151. object-orientation in C :-)).  Another advantage is that the current caching
  152. scheme for redrawing would no longer be needed (i.e. redrawing would be
  153. greatly simplified).  Also undo would become simpler (I think).
  154.  
  155. If we want to make a smooth transition from the current scheme to the
  156. one described above (and I do), here is how I propose we do it:
  157.  
  158. We need to change every direct access to the current lists to use functions.
  159. i.e. something like
  160.         for (a=objects.arc; a!=NULL; a=a->next) ...
  161. to be something like
  162.         for (a=first_arc(); a!=NULL; a=next_arc(a)) ...
  163.  
  164. At the moment these routines would be simple to implement.
  165. Once all occurrences had been changed, it would simply be a matter
  166. of changing the underlying list structure and changing the first_arc,
  167. next_arc routines.  Then as we had time we could replace whichever
  168. sets of six loops by a single loop which did
  169.         for (o=first_obj(); o!=NULL; o=next_obj(o)) ...
  170. -------- end of note about restructuring xfig data structures -------------
  171.  
  172.